.class public Lcom/hierynomus/protocol/commons/buffer/a$a;
.super Lcom/hierynomus/protocol/commons/buffer/a;
.source "Endian.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/hierynomus/protocol/commons/buffer/a;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "a"
.end annotation


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/hierynomus/protocol/commons/buffer/a;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Lcom/hierynomus/protocol/commons/buffer/Buffer;)J
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;)J"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    const-wide/16 v0, 0x0

    const/4 v2, 0x0

    :goto_0
    const/16 v3, 0x8

    if-ge v2, v3, :cond_0

    shl-long/2addr v0, v3

    .line 10
    iget-object v3, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v4, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    add-int/lit8 v5, v4, 0x1

    iput v5, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte v3, v3, v4

    and-int/lit16 v3, v3, 0xff

    int-to-long v3, v3

    or-long/2addr v0, v3

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    return-wide v0
.end method

.method public a(Lcom/hierynomus/protocol/commons/buffer/Buffer;I)Ljava/lang/String;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;I)",
            "Ljava/lang/String;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    mul-int/lit8 p2, p2, 0x2

    .line 11
    new-array p2, p2, [B

    .line 12
    invoke-virtual {p1, p2}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b([B)V

    .line 13
    new-instance p1, Ljava/lang/String;

    const-string v0, "UTF-16BE"

    invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-direct {p1, p2, v0}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V

    return-object p1
.end method

.method public a(Lcom/hierynomus/protocol/commons/buffer/Buffer;J)V
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;J)V"
        }
    .end annotation

    const/16 v0, 0x8

    .line 1
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b(I)V

    .line 2
    iget-object v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    add-int/lit8 v3, v2, 0x1

    iput v3, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v4, 0x38

    shr-long v4, p2, v4

    long-to-int v5, v4

    int-to-byte v4, v5

    aput-byte v4, v1, v2

    add-int/lit8 v2, v3, 0x1

    .line 3
    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v4, 0x30

    shr-long v4, p2, v4

    long-to-int v5, v4

    int-to-byte v4, v5

    aput-byte v4, v1, v3

    add-int/lit8 v3, v2, 0x1

    .line 4
    iput v3, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v4, 0x28

    shr-long v4, p2, v4

    long-to-int v5, v4

    int-to-byte v4, v5

    aput-byte v4, v1, v2

    add-int/lit8 v2, v3, 0x1

    .line 5
    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v4, 0x20

    shr-long v4, p2, v4

    long-to-int v5, v4

    int-to-byte v4, v5

    aput-byte v4, v1, v3

    add-int/lit8 v3, v2, 0x1

    .line 6
    iput v3, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v4, 0x18

    shr-long v4, p2, v4

    long-to-int v5, v4

    int-to-byte v4, v5

    aput-byte v4, v1, v2

    add-int/lit8 v2, v3, 0x1

    .line 7
    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v4, 0x10

    shr-long v4, p2, v4

    long-to-int v5, v4

    int-to-byte v4, v5

    aput-byte v4, v1, v3

    add-int/lit8 v3, v2, 0x1

    .line 8
    iput v3, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    shr-long v4, p2, v0

    long-to-int v0, v4

    int-to-byte v0, v0

    aput-byte v0, v1, v2

    add-int/lit8 v0, v3, 0x1

    .line 9
    iput v0, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    long-to-int p1, p2

    int-to-byte p1, p1

    aput-byte p1, v1, v3

    return-void
.end method

.method public a(Lcom/hierynomus/protocol/commons/buffer/Buffer;Ljava/lang/String;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    const-string v0, "UTF-16BE"

    .line 14
    invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-virtual {p2, v0}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B

    move-result-object p2

    .line 15
    invoke-virtual {p1, p2}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a([B)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    return-void
.end method

.method public b(Lcom/hierynomus/protocol/commons/buffer/Buffer;)I
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;)I"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    const/4 v0, 0x2

    .line 5
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a(I)V

    .line 6
    iget-object v0, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte v1, v0, v1

    shl-int/lit8 v1, v1, 0x8

    const v3, 0xff00

    and-int/2addr v1, v3

    add-int/lit8 v3, v2, 0x1

    iput v3, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte p1, v0, v2

    and-int/lit16 p1, p1, 0xff

    or-int/2addr p1, v1

    return p1
.end method

.method public b(Lcom/hierynomus/protocol/commons/buffer/Buffer;I)V
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;I)V"
        }
    .end annotation

    const/4 v0, 0x2

    .line 1
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b(I)V

    if-ltz p2, :cond_0

    const v0, 0xffff

    if-gt p2, v0, :cond_0

    .line 2
    iget-object v0, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    shr-int/lit8 v3, p2, 0x8

    int-to-byte v3, v3

    aput-byte v3, v0, v1

    add-int/lit8 v1, v2, 0x1

    .line 3
    iput v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    int-to-byte p1, p2

    aput-byte p1, v0, v2

    return-void

    .line 4
    :cond_0
    new-instance p1, Ljava/lang/RuntimeException;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Invalid uint16 value: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public b(Lcom/hierynomus/protocol/commons/buffer/Buffer;J)V
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;J)V"
        }
    .end annotation

    const/4 v0, 0x4

    .line 7
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b(I)V

    const-wide/16 v0, 0x0

    cmp-long v2, p2, v0

    if-ltz v2, :cond_0

    const-wide v0, 0xffffffffL

    cmp-long v2, p2, v0

    if-gtz v2, :cond_0

    .line 8
    iget-object v0, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v3, 0x18

    shr-long v3, p2, v3

    long-to-int v4, v3

    int-to-byte v3, v4

    aput-byte v3, v0, v1

    add-int/lit8 v1, v2, 0x1

    .line 9
    iput v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v3, 0x10

    shr-long v3, p2, v3

    long-to-int v4, v3

    int-to-byte v3, v4

    aput-byte v3, v0, v2

    add-int/lit8 v2, v1, 0x1

    .line 10
    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    const/16 v3, 0x8

    shr-long v3, p2, v3

    long-to-int v4, v3

    int-to-byte v3, v4

    aput-byte v3, v0, v1

    add-int/lit8 v1, v2, 0x1

    .line 11
    iput v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    long-to-int p1, p2

    int-to-byte p1, p1

    aput-byte p1, v0, v2

    return-void

    .line 12
    :cond_0
    new-instance p1, Ljava/lang/RuntimeException;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Invalid uint32 value: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public c(Lcom/hierynomus/protocol/commons/buffer/Buffer;)I
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;)I"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    const/4 v0, 0x3

    .line 6
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a(I)V

    .line 7
    iget-object v0, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte v1, v0, v1

    shl-int/lit8 v1, v1, 0x10

    const/high16 v3, 0xff0000

    and-int/2addr v1, v3

    add-int/lit8 v3, v2, 0x1

    iput v3, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte v2, v0, v2

    shl-int/lit8 v2, v2, 0x8

    const v4, 0xff00

    and-int/2addr v2, v4

    or-int/2addr v1, v2

    add-int/lit8 v2, v3, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte p1, v0, v3

    and-int/lit16 p1, p1, 0xff

    or-int/2addr p1, v1

    return p1
.end method

.method public c(Lcom/hierynomus/protocol/commons/buffer/Buffer;I)V
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;I)V"
        }
    .end annotation

    const/4 v0, 0x3

    .line 1
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b(I)V

    if-ltz p2, :cond_0

    const v0, 0xffffff

    if-gt p2, v0, :cond_0

    .line 2
    iget-object v0, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    shr-int/lit8 v3, p2, 0x10

    int-to-byte v3, v3

    aput-byte v3, v0, v1

    add-int/lit8 v1, v2, 0x1

    .line 3
    iput v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    shr-int/lit8 v3, p2, 0x8

    int-to-byte v3, v3

    aput-byte v3, v0, v2

    add-int/lit8 v2, v1, 0x1

    .line 4
    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->d:I

    int-to-byte p1, p2

    aput-byte p1, v0, v1

    return-void

    .line 5
    :cond_0
    new-instance p1, Ljava/lang/RuntimeException;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Invalid uint24 value: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public c(Lcom/hierynomus/protocol/commons/buffer/Buffer;J)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;J)V"
        }
    .end annotation

    const-wide/16 v0, 0x0

    cmp-long v2, p2, v0

    if-ltz v2, :cond_0

    .line 8
    invoke-virtual {p0, p1, p2, p3}, Lcom/hierynomus/protocol/commons/buffer/a$a;->a(Lcom/hierynomus/protocol/commons/buffer/Buffer;J)V

    return-void

    .line 9
    :cond_0
    new-instance p1, Ljava/lang/RuntimeException;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Invalid uint64 value: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public d(Lcom/hierynomus/protocol/commons/buffer/Buffer;)J
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;)J"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    const/4 v0, 0x4

    .line 1
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a(I)V

    .line 2
    iget-object v0, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a:[B

    iget v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte v1, v0, v1

    shl-int/lit8 v1, v1, 0x18

    int-to-long v3, v1

    const-wide v5, 0xff000000L

    and-long/2addr v3, v5

    add-int/lit8 v1, v2, 0x1

    iput v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte v2, v0, v2

    shl-int/lit8 v2, v2, 0x10

    int-to-long v5, v2

    const-wide/32 v7, 0xff0000

    and-long/2addr v5, v7

    or-long/2addr v3, v5

    add-int/lit8 v2, v1, 0x1

    iput v2, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte v1, v0, v1

    shl-int/lit8 v1, v1, 0x8

    int-to-long v5, v1

    const-wide/32 v7, 0xff00

    and-long/2addr v5, v7

    or-long/2addr v3, v5

    add-int/lit8 v1, v2, 0x1

    iput v1, p1, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c:I

    aget-byte p1, v0, v2

    int-to-long v0, p1

    const-wide/16 v5, 0xff

    and-long/2addr v0, v5

    or-long/2addr v0, v3

    return-wide v0
.end method

.method public e(Lcom/hierynomus/protocol/commons/buffer/Buffer;)J
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;>(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "TT;>;)J"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    .line 1
    invoke-virtual {p0, p1}, Lcom/hierynomus/protocol/commons/buffer/a$a;->d(Lcom/hierynomus/protocol/commons/buffer/Buffer;)J

    move-result-wide v0

    const/16 v2, 0x20

    shl-long/2addr v0, v2

    invoke-virtual {p0, p1}, Lcom/hierynomus/protocol/commons/buffer/a$a;->d(Lcom/hierynomus/protocol/commons/buffer/Buffer;)J

    move-result-wide v2

    const-wide v4, 0xffffffffL

    and-long/2addr v2, v4

    add-long/2addr v0, v2

    const-wide/16 v2, 0x0

    cmp-long p1, v0, v2

    if-ltz p1, :cond_0

    return-wide v0

    .line 2
    :cond_0
    new-instance p1, Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;

    const-string v0, "Cannot handle values > 9223372036854775807"

    invoke-direct {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public toString()Ljava/lang/String;
    .locals 1

    const-string v0, "big endian"

    return-object v0
.end method
